; Standard adventure source, copyright (C) 1988 Level 9 Computing.
;
; ACONST.TXT, general constants and variables for standard adventure.
; This should not include any game-specific data.
;
CONST
;
 Minus20=65516

 itA=0
 itAN=1
 SingularSOME=2
 he=3 ; >>Mike 1/2/88 - now have "the" or "a" before them.
 she=4 ;>>mike 1/2/88 - i.e. not proper nouns. - see below.
 PluralSOME=5
 you=6
 ProperMale=7 ;>>mike 1/2/88
 ProperFemale=8 ;>>mike 1/2/88
;
 EAST=3
 WEST=7
;
; NOW CONSTANTS FOR COMMON MESSAGES
 SPACE=1
 COMMA=3
 CR=5
 AND=6
 SPACEand=14
 DOTnoSPACE=4
 DOTCR=7
 DOT=9
 THE=21
 COLON=18
 COLONnoSPACE=2
 QUOTE=19
 SOME=23
 DOTquote=24
 BlankLine=25
 STAR=98
 PLUS=99
;
 OWexits=1
 OWobjects=2
;
 NONSPECIFIC=31 ; USE IN POSITION SEARCH WHERE TYPE UNKNOWN
 STACKspace=20
 MAXdirection=14 ; ACROSS
 MAXdirectionPLUS1=15
;
; Bases for text blocks
 EXITdescBASE=50
 OBJECTdescBASE=300
 EXAMINEmessages=600
 EXAMINEoffset=300 ; from NOUNOFFSET
 EXAMINEmaxOFFSET=500
;
; Preposition values (all relative to prepoffset)
 ipON=1
 ON=1
 UNDER=2 
 BEHIND=3
 CARRIED=4
 WORN=5
 AT=6 ; for INPUT
 ipIN=7
 IN=7
 HANGING=8
 ipFROM=17
 LIEON=12
 SITON=13
 WITH=16
; 
 ipOFF=200 ;66
 OFF=200 ;66
 UP=201 ;67
 DOWN=202 ;68
 ipTO=203
 iTO=1803 ;93 - absolute message number
 ipOUT=204 ;70
 iFOR=206 ;73 ; relative to prepoffset
 iUNTIL=207 ;73 ; relative to prepoffset
 ipDEBUG=208
;
 DISABLEIT=255
;
; Movement verbs..
 iNORTH=1
 ivDOWN=10
 ivUP=9
 ivIN=11
 iCROSS=13
 iCLIMB=14
 iJUMP=15
;
; Intransitive verbs..
 iAGAIN=21
 iLOOK=22
 iINVENTORY=23
 iQUIT=24
 iRESTORE=25
 iRAMSAVE=27
 iRAMLOAD=28
 iVERBOSE=30
 iBRIEF=31
 iNONE=32 ; description mode
 iplay=33
 ivON=34
 ivOFF=35
 iHELLO=205 ; >>fixed in g338
 iOOPS=39
 iATTACK=40
 iSEARCH=42
 iSMELL=44
 iSIT=48
 iSTAND=46
 iSAY=50
;
 iTELEPORT=51
 iGETME=52
 iSETupRUN=54
 iSETupGO=58

 iReportProblem=65

 iSHOUT=73
 ivTO=75
;
 iHAVE=80 ; group of verbs for output..
 iHAS=81
 iAM=82
 iARE=83
 iIS=84
;
 iGOin=87
 iGOout=88
;
; goal-directed verbs
 iWaitforPersontoLeave=94
 iWAITforPERSON=89
 iWAITuntilTIME=90
 iWAITforPERIOD=91
 iWAIT=92 ; short wait
 iPARSEwait=32 ; what the user gets when he types "wait"
 iKILL=93
;
 iDODGE=95
 iGDgo=96 ; npcs use this
 iGDrun=97
 icheat=98
 iBUY=99
;
; Transitive verbs..
 iEXAMINE=100
 iGET=104
 iTAKE=105
 iWEAR=106
 iDROP=107
 iPUT=108
 iREMOVE=109
 iTHROW=110
 iGIVE=111
 iASK=112
 iFOLLOW=113
 iOPEN=114
 iEXTINGUISH=116
 iPRESS=117
 iDRESS=129
 iCOLLECT=132
 iRETURNobject=136 ; for npcs only
 iSETUPfind=138
 iGDfind=139
 iCLOSE=115
 iTELL=142
 iLocalMove=143
 iSTRUGGLE=144
 iSTEALallFROM=145
 iENTER=166
;
; game specific..
 iSCRATCH=170
 iHIT=233 ;183
 iCRUSH=186
 iDEMOLISH=189
;
; Echo verbs also used for Y/N questions
 ivNO=199 ;>>mike 26/8/88 - 200
 ivYES=201
 iWHY=213
;
; now verbs to do with racetracks (can never be typed by player as 
; their message numbers are used by the first few nouns)..
 OBEYracetrack=252
 RtAnimate=246
 RtFaceNoun1=245
 RtConditional=247
 RtRConditional=250
 RtActorVaryMessage=248
 RtActorSingleMessage=249
 racetrackMESSAGE=251
 racetrackVARYMESSAGE=252
 racetrackGOSUB=253
 racetrackGOTO=254
 racetrackRETURN=255
;
; Verb groups..
 maxINTRANSITIVE=99
 maxTRANSITIVE=195
 minECHOminus1=198
 minECHOtransitive=235 ; none
 maxECHO=250
;
; Collective nouns..
 minCOLLECTIVE=234
 maxCOLLECTIVE=238
 iEVERYTHING=234 ; EVERYTHING-NOUNOFFSET
;>>mike 25/8/88 iTREASURE=235
;>>mike 25/8/88 iWEAPONS=236
 iPEOPLE=237
;>>mike 25/8/88 iCLOTHES=238
;
; Now nouns
 iBE=242
 iEXCEPT=247
 iIT=248
 iMINUTES=249
;---
; some omni-present objects
 generalDOOR=239 ; omni-present nowadays
 WATER=241
 iYOU=253
;
; Misc noun values..
 minGARBAGE=3699
 maxGARBAGE=3799
;
 nullOBJECT=255
 nullVALUE=65535
 nullNUMBER=65535
;
; WORD TYPE VALUES..
 ASCItype=0  ; non-alpha characters are returned as their ASCII values 
 ASCIItypeE=0
 VERBtype=2  ; 'V'erb
 CONJtype=4  ; con'J'unction, e.g 'Take this AND that'
 PREPtype=6  ; 'P'reposition, e.g 'Give something TO someone'
 NOUNtype=8  ; 'N'oun
 ADJEtype=10 ; 'A'djective
 MATCHtype=12; 'C'  used for matching with particular words -
             ;     e.g. was a reference to scenery the word 'panel'
 NUMBtype=14
 maxTYPE=14
 maxAMBIG=10 ; MAX NUM OF AMBIG FORMS ACCEPTED FROM INPUT
;
 ASCIoffset=0
 VERBoffset=50
 CONJoffset=0 ; ???
 PREPoffset=1600
 NOUNoffset=300
 ADJEoffset=300 ; = NOUNoffset
 MATCHoffset=4300 ; used for matching with particular words
;
; ASCII VALUES
 iCOMMA=44
 iDOT=46
;
; Conjunctions (absolute message numbers)..
 iTHEN=551
 iTHEREFORE=552
;
;---
 FALSE=0
 TRUE=1
 ERRORcode=2
;
; Constants for Objecttable assignments
;
 otBASE=32
 otBASEplus1=33
 otMAX=47 ; otbase+15
 NOUNcarried=1
 NOUNonGROUND=2
 NOUNnotOBVIOUS=2 ; ADDED TO ABOVE WHEN NOUN IS NOT OBVIOUSLY HERE
 NOUNspecified=128
 NOUNforbidden=192
;
 OK=2153 ; message 'OK'
;
 NEGATIVE=50000
;---
 HOSTILE=9
 FRIENDLY=0
;
;---------------------------------------------------------------------------
;
VAR
 V1 ; must be first var
 V2 ; must be second var
 v3 v4 v5 v6 v7 ; etc..
;; v8 v9 v10 v11 v12 v13 v14 v15 v16 v17 v18 v19

 X1 X2 X3 X4 X5 X6 ; Temporary work variables
 C0 C1 C2 C3
;; C6 C8 C10 ; "Constants" with corresponding values

; Input is converted to (e.g Put the Red Box on the Green Chair)..
 VERB ; Put 
 PREP ; On
 NOUN1 ; Red Box 
 NOUN2 ; Green Chair
;; GMJ 26/09/89 ;; iNUMBER ; Number, if specified ANYWHERE in input, eg "push button 1"

; Used internally in parseinput..
;; GMJ 26/09/89 ;; ADJECTIVE1
;; GMJ 26/09/89 ;; ADJECTIVE2

 VALUE ; General purpose result
 INDEX ; Only used by READINPUTLIST

;; GMJ 26/09/89 ;; HIFROM
 FROM ; Two byte values where (single) movement is from..
             ; "Hi" is containment type, other is room/container
;>>removed by L2 TO ; ? 
 HIDEST DEST ; Destination of move. See HIFROM and FROM

 STATUS ; Used by exit code. Status nibble. Last? Door? Invis? Two-way? 
 ROOM ; Current room of actor. Only changed by setupROOM
 DIR ; Direction of move
;; GMJ 26/09/89 ;; NUMEXITS ; Just used by PRINTEXIT code
;; GMJ 26/09/89 ;; LASTROOM ; Previous room that actor was in
;; GMJ 26/09/89 ;; EXITVISIBLE ; A result of CHECKEXIT
;; GMJ 26/09/89 ;; CURRENTOBJECT ; Just used by PRESENTMULTIPLE
 OBJECT ; General purpose variable, object acted upon by routines 
 HIPOS POS ; General purpose position of object
 SEARCHPOS HISEARCHPOS ; Where parser expects object. E.g carried or on 
; ground in current room. Also used in GETNEXTOBJECT, which returns the 
; contents of the specified position, one at a time.
 
;; NUMOBJECTFOUND ; Internal to the parser

 LASTWORDPRINTED ; For printing IT in place of noun. "Last" noun printed.
;>>removed by L2 INITIALHISEARCHPOS ; ?
 OUTPUTWORD ; Internal to  OUTWORDn (prints exits/object list)
 WORD1 WORD2 WORD3 WORD4 ; Internal to OUTWORDn
 OWTYPE ; ditto. Word type, so article can be added/pronoun substituted.

 RESULT ; General purpose result. Widely returned (as TRUE or FALSE)

 M1 M2 ; General purpose output messages. Lots of routines print M1. 
 SEARCHDEPTH ; Parameter to GETNEXTWORD
 OBVIOUS ; Flag returned by CHECKIFOBVIOUS, if OBJECT can be seen
;; GMJ 26/09/89 ;; LASTPICTURE ; Last picture displayed (i.e the one you can probably see).
;
 SEARCHTYPE ; used in CHECKTYPE. Class of word checked for (eg NOUN, VERB)
;; GMJ 26/09/89 ;; WORDTYPE ; internal variable of CHECKTYPE 
;; GMJ 26/09/89 ;; EXCEPT ; Internal to parser. Did player type something like "ALL EXCEPT"?
 WORDNOTPROCESSED ; Internal to parser 
;; GMJ 26/09/89 ;; EOL SEPARATOR ; Internal to parser. 
               ; Respectively set at end of sentence/phrase
 EVERYTHING ; Internal to parser. Did player use "EVERYTHING"?
;; GMJ 26/09/89 ;; NOMOREINPUT ; Do not change this unless you're using GETNEXTWORD.
             ; Set at end of input line. Remains set unless made FALSE
 PROCESSED ; Flag set in parsing. 
;; GMJ 26/09/89 ;; SUPRESSCHECKING ; Internal to parser
;
 itWORD ; value substituted for "IT" in input
 itNUMBER ; ditto, for "INUMBER"
;
;; GMJ 26/09/89 ;; AGAINVERB againnoun1
 againnoun2
;; GMJ 26/09/89 ;; againprep ; stored command, for AGAIN
;
 VERBSTOCALL ; used by PRESENTMULTIPLE
 HAVECALLEDVERB ; ditto
 SOMETHINGPROCESSED ; prevents spurious "What now?" prompts 
 LASTVERBVALID ; Can user type 'again'? (Only to repeat a valid command)
;
;; TRAMPTR TRAMBASE ; Not used
;; GMJ 26/09/89 ;; TIMEINROOM ; Time since player last moved
;>>removed by L2 CONFIRMMESSAGE ; ?not used
;
;; GMJ 26/09/89 ;; TIME ; Player turns since game started
;; GMJ 26/09/89 ;; HOUR
 MINUTE
;; GMJ 26/09/89 ;; DAY ; current time

 TIMEPASSED ; Time to add on during the coming move.

;; SCOREDTHISMOVE ; Did player score during the current turn (Used in POM)
;; GMJ 26/09/89 ;; SCOREINDEX ; Used within ADDSCORE routine to specify what to score for.
 CURRENTMESSAGE ;?
;; GMJ 26/09/89 ;; DOOROPEN DOOR ; status/presence of door in current room
;
;; SPELL ; used in CAST
 ACTOR ; current person who is moving/doing things
;
;; GMJ 26/09/89 ;; BLOWSTRENGTH ; used in combat
 PROCESSINGSAY ; is user giving commands to someone?
;>>removed by L2 ANIMATE ; ?
;; ESPROOM ; ?
 SAYRESPONSE ; used by CONVERSE.TXT to specify when a response to
; the present conversational command has been printed

;; GMJ 26/09/89 ;; OOPSPOS OOPSPOSEND ; internal to OOPS code

 ACTORATTRIBUTES ; used all over the place by NPC handlers
;; GMJ 26/09/89 ;; moreinfoexpected ; Program has typed where? and allows just a noun input 
 vandalptr ; internal to vandalism code

 startfloorpointers ; within list5
 startracetracks ; within list5
;; GMJ 26/09/89 ;; numexplicitmoves ; number of moves made by N/S/E etc. rather than GO
;>>removed by L2 erroroccurred ; unused
;>>removed by L2 timeoflastinput ; ??
;>>removed by L2 anythingprintedthisturn ; unused
 wanttoprintand ; set to number of noun to replace with 'and'
 executeprocessed ; set when gd commands have been acted on
;>>removed by L2 terraintype ; ??
;>>removed by L2 treetype ; unused
 descriptionmode ; verbose/brief/none. (None is the case for 'run')
 startreversaltable ; in list5  
 currentuserroom ; where player is (for benefit of npcs)
 commandfinished ; set when a multiple command has finished
 forceprinting ; when set, player gets messages even when not nearby
 orderwaiting ; in NPC decision code. Is a queued command waiting?
;; GMJ 26/09/89 ;; cheatmode ; flag indicating level of cheating
;; GMJ 26/09/89 ;; treatasfind ; internal to the parser
 DestToDescribeExitsIn ; yeuch! So exits described in final room of "GO"
;
 normaldescriptionmode ; the mode selected by the user
 wordsoutput ; internal to PRINTEXITS etc
 X Y ; Coordinates of ROOM on grid. Set by GETXY
;; GMJ 26/09/89 ;; target ; victim of combat etc
;; fightingsomeone ; used in decision code of NPCs
;; GMJ 26/09/89 ;; currentsceneryobject ; unused 
;; currentheight ; unused

 printingobjects ; internal to PRINTEXITS etc
;; GMJ 26/09/89 ;; severalexits ; ditto

;>>removed by L2 picturetodraw ; parameter given to SHOWPICTURE 
;>>removed by L2 initialscene ; controls state of initial scene in e.g Knight Orc.
              ; when non-zero, disables many things and acts as counter.
 highwater ; debugging variable, reporting max stack space used.
 freespaceptr ; internal to NPCPUSH and NPCPOP
;>>removed by L2 lastuserroom ; Where user came from. See also LASTROOM 
;; GMJ 26/09/89 ;; anglefromintended ; used in GO, when desired direction is blocked
;; GMJ 26/09/89 ;; intendeddirection ; ditto
; NoTreasureInRoom ; set when npc finds no treasure in current room 
; in order to speed things up.
 synthdest ; destination on grid that actor is moving to
;; roomtoactivate ; random room, other than ROOM and LASTUSERROOM, 
                ; in which NPCs get to move this turn
;>>removed by L2 timefornpcactions ; unused
;; GMJ 26/09/89 ;; destnoun1 ; tells gdgoxy when it has arrived

 initfifoactor ; internal initfifo. ++++ MUST NOT BE CHANGED BY CODER. ++++
 lastunlinkedcommand ; internal to NPCPUSH
 commandstolink ; ditto

 fatalerror ; serious error, set to fail current goal-directed command
 lightinroom ; user's room light?
;; GMJ 26/09/89 ;; blockedbysm ; internal to goal directed movement

;; WEAPON ; internal to combat
;>>removed by L2 WEAPONSTRENGTH ; ditto
;; GMJ 26/09/89 ;; OTPOS OTHIPOS ; object position, set at start of OBJECTTRIGGER
;; GMJ 26/09/89 ;; hitpoints ; internal to combat
;; GMJ 26/09/89 ;; activationsremaining ; used to limit number of NPCs active each turn
;>>removed by L2 loopactor ; ??
;; GMJ 26/09/89 ;; xcoord ycoord ; position of picture
;
;; GMJ 26/09/89 ;; parttochain thispart thisgame dead ; Chain variables
;; part1score part12score ; chain variables ;>>special to gnome

;; picture1displayed ; has the picture border been displayed?
;
;; GMJ 26/09/89 ;; npclist9save0
 npclist9save1
;; GMJ 26/09/89 ;; npclist9save2 npclist9save3
 npclist9save4
 npclist9save5
;; GMJ 26/09/89 ;; npclist9save6 ; used when driver called, to protect data
;
;; GMJ 26/09/89 ;; m1save
 m1printsave actorsave objectsave
;; GMJ 26/09/89 ;; roomsave
 ceroomsave
;; GMJ 26/09/89 ;; gdgoroomsave gdroomsave ; misc vital save variables
;
;; GMJ 26/09/89 ;; gameover
;; GMJ 26/09/89 ;; AutoExits
 twNoun
;; GMJ 26/09/89 ;; verbsave
 ValueSave ; used by RTConditional to save position in rt
;
; variables for new PrintObject...

 CurrentObjectsPrinted LastHicurrentpos LastCurrentPos TotalObjectsPrinted
 SaveHisearchpos SaveSearchpos PluralOffset
;---------------------------------------------------------------------------

; vars for strategy task...
 ActorX ActorZ ActorH
 DestX DestZ DestH
;; GMJ 26/09/89 ;; sDestX sDestz ; for strategy task only.
;; GMJ 26/09/89 ;; ToNewRoomDir ; must be one of first 256 vars.

; book protection vars...
;; GMJ 26/09/89 ;; PAGE
 LINE
;; GMJ 26/09/89 ;; WORD
;; GMJ 26/09/89 ;; RANDOMSEED
;; GMJ 26/09/89 ;; count TESTcount SAVEcount
;; GMJ 26/09/89 ;; ATTEMPTS

; oops code...
 ramsaveused ; 493=yes. Other values=no ; *** PETE 25/6/87

; vars shared between graphics and strategy tasks...
 frames
;; GMJ 26/09/89 ;; sActorACB

;
TABLE
 OBJECTSTART=1
;
 CURRENTPOS=2 ; OBJECT CURRENT POSITION
 HICURRENTPOS=3
;
; TERRAINTABLE=4
; TRAMLINES=4 ; paths for mobiles
; 
 list4=4

 NPCINITIAL=5  ; NPC initial status
 LIST5=5       ; Also used for floorpointers - from startfloorpointers on.
; 
; SCRATCHLIST=6 ; NPC status and queued commands. Also vandalised rooms.
 NPCCURRENT=6
 NPCSTACK=6
; VANDALTABLE=6
;
 OUTPUTBUFFER=7
 SCORETABLE=7 ; from entry 16 onwards
 list7=7
;
 LIST8=8
;
 OBJECTTABLE=9 ; USED FOR EVERYTHING AND SIMILAR WORDS
 LIST9=9
 LINPUT=9
